import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class RmiServer {

    public static void main(String[] args) {
        Registry registry = null;

        try {
            registry = LocateRegistry.createRegistry(8080);

            Service service = new ServiceImpl();
            registry.rebind("firstRMI",service);

            Service2 service2 = new Service2Impl();
            registry.rebind("secondRMI",service2);

        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
